import React, { Component } from 'react'
import RouterView from '../routre/routweView'
import {  Menu,Layout } from 'antd';
import {
  PieChartOutlined,
  DesktopOutlined,
  ContainerOutlined,
  MailOutlined,
} 
from '@ant-design/icons';

const { SubMenu } = Menu;
const { Header, Sider, Content } = Layout;
const stylehead={
     width:"100%",
     height: "100%"
}
const styleaa={
    background: "aqua"
}
 class All extends Component {
    state = {
        collapsed: "false",
      };
    
      toggleCollapsed = () => {
        this.setState({
          collapsed: !this.state.collapsed,
        });
      };
    
  render() {
    return (
      <div style={stylehead}>
          <Layout style={stylehead}>
      <Header style={styleaa}>
            <span>编程导航</span>
            <div>

            </div>
            <div>
                <input type="text" />
                <button>推荐</button>
            </div>
      </Header>
      <Layout>
        <Sider>
        <div style={{ width: 200 }}>

        <Menu
          defaultSelectedKeys={['1']}
          defaultOpenKeys={['sub1']}
          mode="inline"
          theme="dark"
          collapsed={this.state.collapsed}
        >
          <Menu.Item key="1" icon={<PieChartOutlined />}>
            Option 1
          </Menu.Item>
          <Menu.Item key="2" icon={<DesktopOutlined />}>
            Option 2
          </Menu.Item>
          <Menu.Item key="3" icon={<ContainerOutlined />}>
            Option 3
          </Menu.Item>
          <SubMenu key="sub1" icon={<MailOutlined />} title="Navigation One">
            <Menu.Item key="5">Option 5</Menu.Item>
            <Menu.Item key="6">Option 6</Menu.Item>
            <Menu.Item key="7">Option 7</Menu.Item>
            <Menu.Item key="8">Option 8</Menu.Item>
          </SubMenu>
          
        </Menu>
      </div>
        </Sider>
        <Content>
        <RouterView Routerlist={this.props.children}></RouterView>
        </Content>
      </Layout>
     
    </Layout>

          
      </div>
    )
  }
}

export default All